import java.awt.*;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;

/**
 * Created By  醉美柳舞之众星捧月
 *
 * @author songx
 * @date 2019/7/7 0:10
 */
public class MouseClickIcuEnter implements MouseListener {
    URI uri;
    Desktop dpt = Desktop.getDesktop();

    public void mouseClicked(MouseEvent e) {
        try {
            uri = new URI("https://996.icu");
        } catch (URISyntaxException e2) {
            e2.printStackTrace();
        }
        if (Desktop.isDesktopSupported() && dpt.isSupported(Desktop.Action.BROWSE)) {
            try {
                dpt.browse(uri);
            } catch (IOException e1) {
                e1.printStackTrace();
            }
        }
    }

    public void mousePressed(MouseEvent e) {

    }

    public void mouseReleased(MouseEvent e) {

    }

    public void mouseEntered(MouseEvent e) {

    }

    public void mouseExited(MouseEvent e) {

    }
}
